Conventional graphics processors are exemplified by systems and methods developed to read and filter texture map samples. To simplify the texture map filtering performed within a graphics processor, a texture is prefiltered and various resolutions of the prefiltered texture are stored as mip mapped texture maps. FIG. 1A is a conceptual diagram of prior art showing a mip mapped texture including a highest resolution texture map, Texture Map 101. A Texture Map 102, a Texture Map 103, and a Texture Map 104 are successively lower resolution texture maps, mip maps, each storing prefiltered texture samples.
Classic mip maps are isotropically filtered, i.e. filtered symmetrically in the horizontal and vertical directions using a square filter pattern. Isotropically filtered mip maps result in high quality images for surfaces with major and minor texture axis that are similar in length. However, when an isotropically filtered texture is applied to a receding surface viewed “on edge”, aliasing artifacts (blurring) become apparent to a viewer as the texture is effectively “stretched” in one dimension, the receding direction, as the texture is applied to the surface. A Footprint 115 is a pixel footprint in texture space, with a Position 135 being the pixel center. FIG. 1B illustrates a prior art application of Texture Map 101 applied to pixels of a Surface 140 that is receding in image space. When viewed in image space, Footprint 115 (an ellipse) appears as Footprint 116 (a circle). While isotropic filtering of texture samples within a pixel footprint that forms a circle in texture space results in a high-quality image, isotropic filtering of texture samples within a pixel footprint that forms an ellipse, such as Footprint 115, results in an image with aliasing artifacts. In contrast to isotropic filtering, anisotropic filtering uses a rectangular shaped filter pattern, resulting in fewer aliasing artifacts for footprints with major and minor axes that are not similar in length in texture space.
FIG. 1C illustrates Footprint 115 including a Minor Axis 125 that is significantly shorter than a Major Axis 130. FIG. 1D illustrates a prior art application of anisotropic filtering of Texture Samples 150 along Major Axis 130. Texture Samples 150 read from one or more mip maps are anisotropically filtered to produce a filtered texture sample. However, as shown in FIG. 1A a portion of Footprint 115 may lie outside of Texture 101, and Texture 101 will be “wrapped” (as shown in FIGS. 2A and 2B) to fill the portion of Footprint 115.
Traditionally texture map dimensions are powers of two in order to simplify computations used to convert from texture parameters represented in surface space to texture coordinates represented in texture space. Specifically, a texture map dimension, n, that is a power of two may be expressed as n=2i, where i is an integer. The texture coordinates are used to read texture map samples from memory. Power of two texture maps are also used to simplify computations used to support the wrap modes shown in FIGS. 2A and 2B. FIG. 2A illustrates a texture map applied to a square surface using a “repeat” wrap mode. FIG. 2B illustrates a texture map applied using a “mirror” wrap mode. When non power of two texture maps, such as a video image that has not been resampled, are used, computing wrapped texture coordinates is more difficult, i.e., requiring division by an arbitrary value.
Accordingly, there is a need to use non-power of two texture maps, such as a video image. Furthermore, there is a need to apply non-power of two texture map to a surface using a wrap mode, such as repeat or mirror wrap mode; there is also a need to use such techniques in combination with anisotropic filtering.